<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
	pageEncoding="ISO-8859-1"%>
<%@taglib uri="http://www.springframework.org/tags/form" prefix="form"%>
<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<jsp:include page="Header.jsp"/>
<title>Edit Student page</title>
</head>
<body>
<jsp:include page="AdminNav.jsp"/>
	<h2>Edit Employee page</h2>
	<form:form method="POST" commandName="Employee"
		action="${pageContext.request.contextPath}/employee/edit/${Employee.employeeId}.html">
		<table>
			<tbody>

				<tr>
					<td>Name:</td>
					<td><form:input path="name" class="form-control"/></td>
					<td><form:errors path="name" cssStyle="color: red;" /></td>
				</tr>
				<tr>
					<td>Role:</td>
					<td><form:input path="role" class="form-control" /></td>
					<td><form:errors path="role" cssStyle="color: red;" /></td>
				</tr>
				<tr>
					<td>Reporting To:</td>
					<td><select name="reportingTo.employeeId" class="form-control">
							<c:forEach items="${empList}" var="V">
								<option value="${V.employeeId}">${V.name}</option>
							</c:forEach>
					</select></td>
					<td><form:errors path="reportingTo" cssStyle="color: red;" /></td>
				</tr>
				<tr>
					<td>Email:</td>
					<td><form:input path="email" class="form-control" /></td>
					<td><form:errors path="email" cssStyle="color: red;" /></td>
				</tr>
				<tr>
					<td>Contact No:</td>
					<td><form:input path="contactNo" class="form-control" /></td>
					<td><form:errors path="contactNo" cssStyle="color: red;" /></td>
				</tr>
				<tr>
					<td>Department</td>
					<td><form:input path="departmant" class="form-control"/></td>
					<td><form:errors path="departmant" cssStyle="color: red;" /></td>
				</tr>
				<tr>
					
					<td></td>
					<td class="pull-right"><input type="submit" value="Update" class="btn btn-primary" /></td>
					<td></td>
				</tr>
			</tbody>
		</table>
	</form:form>
	<jsp:include page="footer.jsp"/>
</body>
</html>